
public class TestShape {

	public static void main(String[] args) {

		//创建对象
		Shape shape1 = new Rectangle(4.5,20,"red");
		Shape shape2 = new Circle("blue",9);
		
		//调用方法
		shape1.showAll();
		shape2.showAll();
		
		if(shape1 instanceof Shape) {
			Circle c = (Circle)shape1;
		}
		
	}

}
